<div style="width:60%;padding-left:20%;">
    {$word}
    <!--模板注释-->
    {/*模板注释,生成编译缓存文件后会自动删除*/}
    <select id="id" name="id" class="form-control" onchange="change_group(this.value)">
        {foreach name="user" item="u"}
        <option value="{$u.id}">{$u.name}</option>
        {/foreach}
    </select>


    {/*加载页面*/}
    {include file="index/index_second" title="user" /}
    {include file="index/index_third" title="word"}
    <div id="table"></div>


    <div id="group_table">
        我是group_table
    </div>


</div>

<script>
    function change_group(id){
        var datas = "";
        var html = "";
            html+='<table class="table table-hover">';
            html+='<tr>';
            html+='<th>id</th>';
            html+='<th>name</th>';
            html+='<th>remark</th>';
            html+='</tr>';
        var url = "{:url('demo/index/change_group')}";

        $.post(url,{id:id},function(data){
            for(var i = 0; i < data.length; i++){
                datas = data[i];
//                alert(datas.name);
                html+='<tr>';
                html+='<td>'+datas.id+'</td>';
                html+='<td>'+datas.name+'</td>';
                html+='<td>'+datas.remark+'</td>';
                html+='</tr>';
            }
            html+='</table>';
            $('#group_table').html(html);
    });

    }

//    $('#table').load("{:url('demo/index/table')}");
</script>